package com.lyl.servicelive.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lyl.servicelive.entity.CourseAccount;
import com.lyl.servicelive.entity.CourseDescription;
import com.lyl.servicelive.mapper.CourseAccountMapper;
import com.lyl.servicelive.service.CourseAccountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 直播课程账号表（受保护信息） 服务实现类
 * </p>
 *
 * @author 雷艳玲
 * @since 2022-07-05
 */
@Service
public class CourseAccountServiceImpl extends ServiceImpl<CourseAccountMapper, CourseAccount> implements CourseAccountService {

    @Override
    public CourseAccount getByLiveCourseId(Long id) {
        QueryWrapper<CourseAccount> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("live_course_id", id);
        return baseMapper.selectOne(queryWrapper);
    }
}
